// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 修改保存字典类型 PUT /api/system/dict/data */
export async function dictionaryDataEditUsingPUT(
  body: API.SysDictData,
  options?: { [key: string]: any },
) {
  return request<Record<string, any>>('/api/system/dict/data', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 新增字典类型 POST /api/system/dict/data */
export async function dictionaryDataAddUsingPOST(
  body: API.SysDictData,
  options?: { [key: string]: any },
) {
  return request<Record<string, any>>('/api/system/dict/data', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除字典类型 DELETE /api/system/dict/data/${param0} */
export async function dictionaryDataRemoveUsingDELETE(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.dictionaryDataRemoveUsingDELETEParams,
  options?: { [key: string]: any },
) {
  const { dictCodes: param0, ...queryParams } = params;
  return request<Record<string, any>>(`/api/system/dict/data/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 查询字典数据详细 GET /api/system/dict/data/${param0} */
export async function dictionaryDataGetInfoUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.dictionaryDataGetInfoUsingGETParams,
  options?: { [key: string]: any },
) {
  const { dictCode: param0, ...queryParams } = params;
  return request<Record<string, any>>(`/api/system/dict/data/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 导出字典数据列表 POST /api/system/dict/data/export */
export async function dictionaryDataExportUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.dictionaryDataExportUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<any>('/api/system/dict/data/export', {
    method: 'POST',
    params: {
      ...params,
      params: undefined,
      ...params['params'],
    },
    ...(options || {}),
  });
}

/** 获取字典数据列表 GET /api/system/dict/data/list */
export async function dictionaryDataListUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.dictionaryDataListUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.TableDataInfo>('/api/system/dict/data/list', {
    method: 'GET',
    params: {
      ...params,
      params: undefined,
      ...params['params'],
    },
    ...(options || {}),
  });
}

/** 根据字典类型查询字典数据信息 GET /api/system/dict/data/type/${param0} */
export async function dictionaryDataDictTypeUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.dictionaryDataDictTypeUsingGETParams,
  options?: { [key: string]: any },
) {
  const { dictType: param0, ...queryParams } = params;
  return request<Record<string, any>>(`/api/system/dict/data/type/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}
